#ifndef LOOP_H
#define LOOP_H

#ifdef __cplusplus
extern "C" {
#endif
/*---------------------------- C Scope ---------------------------*/
#include <stdint.h>

void interface_base(void *arg, uint8_t cmd, const uint8_t *data);
void OnUartCmd(void *_arg, uint8_t* _data, uint16_t _len);
void OnCanCmd(uint8_t id, uint8_t _cmd, uint8_t* _data, uint32_t _len);
void uart1_send_pack(uint8_t id, uint8_t cmd, uint8_t *data, uint16_t len);
uint8_t check_sum(uint8_t *data, uint16_t len);
#ifdef __cplusplus
}
/*---------------------------- C++ Scope ---------------------------*/
#include <cstdio>
#include "motor.h"
#include "mt6816_stm32.h"
#include "tb67h450_stm32.h"
#include "encoder_calibrator_stm32.h"
#include "led_stm32.h"
#include "ntc_stm32.h"
#include "button_stm32.h"
#include "adc.h"

extern bool debugOutputFlag;
#endif
#endif
